/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lab9;

/**
 *
 * @author usuario
 */
public class Edge {
    private Vertex origen;
    private Vertex destino;
    private double weight;
    public Edge(Vertex origen, Vertex destino, double weight){
        this.origen=origen;
        this.destino=destino;
        this.weight=weight;
    }

    public boolean equals(Edge ar){
        if((origen.getName().equals(ar.getOrigen().getName()))&&(destino.getName().equals(ar.getDestino().getName()))){
            return true;
        }
        return false;
    }
    public Vertex getOrigen() {
        return origen;
    }

    public void setOrigen(Vertex origen) {
        this.origen = origen;
    }

    public Vertex getDestino() {
        return destino;
    }

    public void setDestino(Vertex destino) {
        this.destino = destino;
    }

    public double getWeight() {
        return weight;
    }

    public void setPeso(float weight) {
        this.weight = weight;
    }
    
}
